<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>Less (Unix)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/Less_(Unix)"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Less_Unix rootpage-Less_Unix skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">less (Unix)</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr"><p class="mw-empty-elt">
</p>
<div class="infobox_v3 infobox infobox--frwiki noarchive" style="width:260px">
<div class="entete icon informatique" style="color: #000000;"><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */
.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}
/* end https://fr.wikipedia.org/ */
</style>
<div>Less</div>
</div>
<p class="mw-empty-elt">
</p>
<div class="images">
</div>
<div class="legend">Fichier log de la commnande <tt>emerge</tt> de gentoo affiché par 'less' dans un <i>terminal xfce</i></div>
<table><caption style="color:#000000;">Informations</caption>
<tbody><tr>
<th scope="row">Créateur</th>
<td>
<span class="wd_p170">Mark Nudelman <small>(<a href="https://www.wikidata.org/wiki/Q113292420" class="extiw external" title="d:Q113292420"><span class="indicateur-langue" title="Voir l'élément Wikidata correspondant">d</span></a>)</small></span></td>
</tr>
<tr>
<th scope="row"> <a href="Version_d'un_logiciel" title="Version d'un logiciel">Première version</a>
</th>
<td>
<span class="wd_p571"><time>1983</time><sup id="cite_ref-wikidata-4690fe5775682bdeebb47b68357b22db4062a7ac_1-0" class="reference"><a href="#cite_note-wikidata-4690fe5775682bdeebb47b68357b22db4062a7ac-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></span></td>
</tr>
<tr>
<th scope="row"> <a href="Version_d'un_logiciel" title="Version d'un logiciel">Dernière version</a>
</th>
<td>
<span class="wd_p348">685 (<time class="nowrap" datetime="2025-10-14" data-sort-value="2025-10-14">14 octobre 2025</time>)<sup id="cite_ref-wikidata-1cfbf02c0da4c0b71ba26c1dfcedf1634088d5e6_2-0" class="reference"><a href="#cite_note-wikidata-1cfbf02c0da4c0b71ba26c1dfcedf1634088d5e6-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup></span></td>
</tr>
<tr>
<th scope="row"><a href="D%C3%A9p%C3%B4t_(informatique)" title="Dépôt (informatique)">Dépôt</a></th>
<td>
<span class="wd_p1324"><a rel="nofollow" class="external text" href="https://github.com/gwsw/less.git">github.com/gwsw/less.git</a></span></td>
</tr>
<tr>
<th scope="row"> <a href="Langage_de_programmation" title="Langage de programmation">Écrit en</a>
</th>
<td>
<span class="wd_p277"><a href="C_(langage)" title="C (langage)">C</a></span></td>
</tr>
<tr>
<th scope="row"><a href="Syst%C3%A8me_d'exploitation" title="Système d'exploitation">Système d'exploitation</a></th>
<td>
<span class="wd_p306"><a href="Linux" title="Linux">GNU/Linux</a>, <a href="Berkeley_Software_Distribution" title="Berkeley Software Distribution">BSD</a>, <a href="MacOS" title="MacOS">macOS</a> et <a href="Microsoft_Windows" title="Microsoft Windows">Microsoft Windows</a></span></td>
</tr>
<tr>
<th scope="row"> Type
</th>
<td>
<span class="wd_p31"><a href="Visionneur_(Terminal)" title="Visionneur (Terminal)">Visionneur</a><br><a href="Liste_des_paquets_GNU" title="Liste des paquets GNU">Paquet GNU</a></span></td>
</tr>
<tr>
<th scope="row"><a href="Licence_de_logiciel" title="Licence de logiciel">Licence</a></th>
<td>
<span class="wd_p275"><a href="Licence_publique_g%C3%A9n%C3%A9rale_GNU" title="Licence publique générale GNU">Licence publique générale GNU version 3 ou ultérieure</a> et BSD 2-clauses <small>(<a href="https://en.wikipedia.org/wiki/Simplified_BSD_license" class="extiw external" title="en:Simplified BSD license"><span class="indicateur-langue" title="Article sur Wikipédia en anglais">en</span></a>)</small></span></td>
</tr>
<tr>
<th scope="row"><a href="Site_web" title="Site web">Site web</a></th>
<td>
<span class="wd_p856"><a rel="nofollow" class="external text" href="https://www.greenwoodsoftware.com/less/">www.greenwoodsoftware.com/less</a></span></td>
</tr>
</tbody></table>
<p class="mw-empty-elt">
</p>
</div>
<p><b><tt>less</tt></b> est une <a href="Commande_Unix" class="mw-redirect" title="Commande Unix">commande Unix</a> permettant de <a href="Visionneur_(Terminal)" title="Visionneur (Terminal)">visualiser un fichier texte page par page (sans le modifier)</a>. Sa fonction est similaire à la commande <tt><a href="More_(Unix)" title="More (Unix)">more</a></tt>, mais permet en plus de revenir en arrière ou de rechercher une chaîne. Contrairement à <tt><a href="Vi_(logiciel)" class="mw-redirect" title="Vi (logiciel)">vi</a></tt> (qui permet aussi de visualiser des fichiers), <tt>less</tt> n'a pas besoin de charger entièrement le fichier en mémoire et s'ouvre donc très rapidement même pour consulter de gros fichiers.
</p>
<div class="mw-heading mw-heading2"><h2 id="Histoire">Histoire</h2></div>
<p><tt>less</tt> a été écrit par Mark Nudelman entre <a href="1983" title="1983">1983</a> et <a href="1985" title="1985">1985</a>, voulant une version de <tt>more</tt> capable de revenir en arrière lors de la visualisation d'un texte. En anglais, <i>more</i> et <i>less</i> sont des antonymes, <i>more</i> signifiant plus (fait référence au fait que cette commande permet de visualiser <i>plus</i> de pages), le nom <i>less</i> est un jeu de mots signifiant <i>more à l'envers</i>.
</p><p>La commande <tt>less</tt> est aujourd'hui maintenue pour le <a href="Projet_GNU" title="Projet GNU">projet GNU</a> par son auteur Mark Nudelman<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>. Elle est distribuée avec la plupart des <a href="Unix" title="Unix">systèmes Unix</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Utilisation">Utilisation</h2></div>
<p><tt>less</tt> possède plusieurs options permettant de modifier son affichage, par exemple en rajoutant le numéro des lignes. Ces options varient d'un Unix à l'autre. Pendant que <tt>less</tt> affiche le contenu d'un fichier, diverses commandes permettent de naviguer (empruntées en partie à <tt>more</tt> et <tt>vi</tt>).
Il est ainsi possible de rechercher des <a href="Cha%C3%AEne_de_caract%C3%A8res" title="Chaîne de caractères">chaînes de caractères</a> comme dans un <a href="%C3%89diteur_de_texte" title="Éditeur de texte">éditeur de texte</a>.
</p><p>Par défaut, <tt>less</tt> affiche le contenu du fichier d'entrée dans la <a href="Flux_standards#Sortie_standard" class="mw-redirect" title="Flux standards">sortie standard</a> (page par page). Si la sortie est redirigée vers autre chose qu'un <a href="Terminal_informatique" class="mw-redirect" title="Terminal informatique">terminal</a>, par exemple vers une autre commande, <tt>less</tt> se comporte comme la commande <tt><a href="Cat_(Unix)" title="Cat (Unix)">cat</a></tt>.
</p><p>Sa syntaxe est :
</p>
<pre><tt>less [options] <fichier></tt>
</pre>
<div class="mw-heading mw-heading2"><h2 id="Exemples">Exemples</h2></div>
<pre>less -M readme.txt # Afficher "readme.txt" avec les informations de position
file * | less # affichage plus pratique du résultat de la commande 'file'
grep -rin void *.c | less -SI -p void # recherche améliorée de la chaîne "void"
</pre>
<div class="mw-heading mw-heading2"><h2 id="Notes_et_références"><span id="Notes_et_r.C3.A9f.C3.A9rences"></span>Notes et références</h2></div>
<div class="references-small decimal" style=""><div class="mw-references-wrap"><ol class="references">
<li id="cite_note-wikidata-4690fe5775682bdeebb47b68357b22db4062a7ac-1"><span class="mw-cite-backlink"><a href="#cite_ref-wikidata-4690fe5775682bdeebb47b68357b22db4062a7ac_1-0">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://public.dhe.ibm.com/eserver/zseries/zos/pdfs/servers_eserver_zseries_zos_unix_redbook_sg245944.pdf"><cite style="font-style:normal;"><span class="lang-en" lang="en">Open Source Software for z/OS and OS/390 UNIX</span></cite></a> », <time class="nowrap" datetime="2002-03" data-sort-value="2002-03">mars 2002</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2024-06-30" data-sort-value="2024-06-30">30 juin 2024</time>)</small></span> : <span class="citation">« <span class="lang-en" lang="en">I wrote the first version in late 1983 and we began using it internally.</span> »</span></span>
</li>
<li id="cite_note-wikidata-1cfbf02c0da4c0b71ba26c1dfcedf1634088d5e6-2"><span class="mw-cite-backlink"><a href="#cite_ref-wikidata-1cfbf02c0da4c0b71ba26c1dfcedf1634088d5e6_2-0">↑</a> </span><span class="reference-text"><span class="ouvrage">« <a rel="nofollow" class="external text" href="https://www.greenwoodsoftware.com/less/news.685.html"><cite style="font-style:normal;"><span class="lang-en" lang="en">Less version 685</span></cite></a> » <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2025-10-15" data-sort-value="2025-10-15">15 octobre 2025</time>)</small></span></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a> </span><span class="reference-text"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <span class="ouvrage" id="2012">« <a rel="nofollow" class="external text" href="http://www.gnu.org/software/less/"><cite style="font-style:normal;">less - GNU Project - Free Software Foundation</cite></a> », sur <span class="italique">gnu.org</span>, <time class="nowrap" datetime="2012-02-22" data-sort-value="2012-02-22">22 février 2012</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2012-12-13" data-sort-value="2012-12-13">13 décembre 2012</time>)</small></span>.</span>
</li>
</ol></div>
</div>
<div class="navbox-container" style="clear:both;">
</div>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de l’informatique</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2023-07-21" href="https://fr.wikipedia.org/wiki/?title=Less_(Unix)&oldid=206217339">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>
</body></html>